require('dotenv').config(); // 加载数据库配置
const { Sequelize } = require('sequelize')
// 创建 sequelize 实例 
// sequelize是nodejs中成熟的ORM框架,可以方便操作不同的数据库
const sequelize = new Sequelize(process.env.DB_NAME, process.env.DB_USER, process.env.DB_PASSWORD, {
    dialect: 'mysql',
    host: process.env.DB_HOST,
    logging: null,
})

module.exports = sequelize